import http from "@/utils/request"

// 根据基地id和鸽棚id获取日结
export function getCageDaily(data) {
    return http({
      url: `/breed/dovecote-daily/getDovecoteDaily?baseId=${data.baseId}&dovecoteNumber=${data.dovecoteNumber}&year=${data.year}&month=${data.month}&day=${data.day}`,
      method: 'get',
    });
}

// 根据基地id获取日结
export function getCageAllDaily(data, queryInfo) {
  return http({
    url: `/breed/dovecote-daily/getAllDovecoteDailyByPage?baseId=${data.baseId}&year=${data.year}&month=${data.month}&day=${data.day}&pageNum=${queryInfo.pageNum}&pageSize=${queryInfo.pageSize}`,
    method: 'get',
  });
}

// 获取7天详细数据
export function getSevenDayDetail(data) {
  return http({
    url: `/breed/dovecote-daily/getDataOf7Day?baseId=${data.baseId}&dovecoteNumber=${data.dovecoteNumber}`,
    method: 'get'
  });
}

export function exportExcel(id) {
  return http({
    url: `/breed/dovecote-daily/exportDailyData?baseId=${id}`,
    method: 'get',
    responseType: 'blob',
    header: {
      headers: { 'Content-Type': 'application/x-download' }
    },
  });
}